home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #11 / Amiga Plus CD - 2002 - No. 11.iso / Tools / Development / PowerD / powerd / modules.lha / modules / gadgets / getfile.m < prev    next >
Encoding:
Text File  |  2001-10-28  |  5.3 KB  |  101 lines

  1. /*
  2. **  $VER: getfile.h 44.1 (19.10.1999)
  3. **  Includes Release 44.1
  4. **
  5. **  Definitions for the getfile.gadget BOOPSI class
  6. **
  7. **  (C) Copyright 1987-1999 Amiga, Inc.
  8. **      All Rights Reserved
  9. */
  10. /*****************************************************************************/
  11. MODULE 'intuition/gadgetclass'
  12. /*****************************************************************************/
  13. /* Attributes defined by the getfile.gadget class
  14.  */
  15. #define GETFILE_Dummy       (REACTION_Dummy + $60000)
  16. #define GETFILE_TitleText     (GETFILE_Dummy+1)
  17. /* (STRPTR) Requester title text (default: None) (OM_NEW, OM_SET) */
  18. #define GETFILE_LeftEdge    (GETFILE_Dummy+2)
  19. #define GETFILE_TopEdge       (GETFILE_Dummy+3)
  20. /* (WORD) Requester coordinates  (default leftedge: 30, topedge: 20) (OM_NEW, OM_SET, OM_GET) */
  21. #define GETFILE_Width       (GETFILE_Dummy+4)
  22. #define GETFILE_Height      (GETFILE_Dummy+5)
  23. /* (WORD) Requester dimensions (default height: 200, width: 300) (OM_NEW, OM_SET, OM_GET) */
  24. #define GETFILE_File      (GETFILE_Dummy+6)
  25. /* (STRPTR) Contents of File gadget (default: None) (OM_NEW, OM_SET, OM_GET, OM_NOTIFY) */
  26. #define GETFILE_Drawer      (GETFILE_Dummy+7)
  27. /* (STRPTR) Contents of Drawer gadget (default: None) (OM_NEW, OM_SET, OM_GET, OM_NOTIFY) */
  28. #define GETFILE_FullFile    (GETFILE_Dummy+8)
  29. /* (STRPTR) Complete file name. Replaces GETFILE_Drawer and GETFILE_File (default: None)
  30.       (OM_NEW, OM_SET, OM_GET, OM_NOTIFY)
  31.   */
  32. #define GETFILE_FullFileExpand  (GETFILE_Dummy+9)
  33. /* (BOOL) GETFILE_FullFile will give complete file name(s) expanded with NameFromLock() to
  34.       remove relative paths. (default: TRUE) (OM_NEW, OM_SET)
  35.   */
  36. #define GETFILE_Pattern       (GETFILE_Dummy+10)
  37. /* (STRPTR) Contents of Pattern gadget (default: "#?") (OM_NEW, OM_SET, OM_GET) */
  38. #define GETFILE_DoSaveMode    (GETFILE_Dummy+11)
  39. /* (BOOL) Being used for saving? (default: FALSE) (OM_NEW, OM_SET) */
  40. #define GETFILE_DoMultiSelect   (GETFILE_Dummy+12)
  41. /* (BOOL) Do multi-select? (default: FALSE) (OM_NEW, OM_SET) */
  42. #define GETFILE_DoPatterns    (GETFILE_Dummy+13)
  43. /* (BOOL) Display a Pattern gadget? (default: FALSE) (OM_NEW, OM_SET) */
  44. #define GETFILE_DrawersOnly     (GETFILE_Dummy+14)
  45. /* (BOOL) Don't display files? (default: FALSE) (OM_NEW, OM_SET) */
  46. #define GETFILE_FilterFunc    (GETFILE_Dummy+15)
  47. /* (struct Hook *) Function to filter files (default: None) (OM_NEW, OM_SET)  */
  48. #define GETFILE_RejectIcons     (GETFILE_Dummy+16)
  49. /* (BOOL) Display .info files? (default: FALSE) (OM_NEW, OM_SET)  */
  50. #define GETFILE_RejectPattern   (GETFILE_Dummy+17)
  51. /* (UBYTE *) Don't display files matching pattern (default: None) (OM_NEW, OM_SET) */
  52. #define GETFILE_AcceptPattern   (GETFILE_Dummy+18)
  53. /* (UBYTE *) Accept only files matching pattern (default: None) (OM_NEW, OM_SET) */
  54. #define GETFILE_FilterDrawers   (GETFILE_Dummy+19)
  55. /* (BOOL) Also filter drawers with pattern (default: FALSE) (OM_NEW, OM_SET) */
  56. #define GETFILE_Filelist    (GETFILE_Dummy+20)
  57. /* (struct List *) If the GETFILE_DoMultiSelect tags was used, you can get a pointer
  58.       to the list of selected files/drawers using this tag. The ln_Name part of
  59.       each node will contain the filename/drawername for each selected file with
  60.       a fully qualified path, even if you didn't use the GETFILE_FullFileExpand.
  61.       In single-selected mode, the list will contain the single selected file for
  62.       notification purposes. Don't forget to free the list using the GFILE_FREELIST
  63.       method! (OM_GET, OM_NOTIFY) */
  64. #define GETFILE_LBNodeStructs   (GETFILE_Dummy+21)
  65. /* (BOOL) GETFILE_Filelist will give a list with ListBrowserNodes instead of normal
  66.       struct Node node structures (default: FALSE) (OM_NEW) */
  67. #define GETFILE_ReadOnly    (GETFILE_Dummy+22)
  68. /* (BOOL) If TRUE, a read-only recessed button gadget is used to present the
  69.       file/drawer information. If FALSE, an editable string gadget is used.
  70.       (default: TRUE) (OM_NEW) */
  71. #define GETFILE_FilePartOnly  (GETFILE_Dummy+23)
  72. /* (BOOL) display file part only - valid ONLY in readonly mode!
  73.    */
  74. /*****************************************************************************/
  75. /*
  76.  * getfile.gadget methods
  77.  */
  78. #define GFILE_REQUEST   ($620001)
  79. #define GFILE_FREELIST  ($620002)
  80. /* The GFILE_REQUEST method should be called whenever you want to open
  81.  * a file/dir requester.
  82.  */
  83. OBJECT gfileRequest
  84.   MethodID:ULONG,                /* GFILE_REQUEST */
  85.   gfile_Window:PTR TO Window     /* The window that will be locked when the requester is active. MUST be provided! */
  86.  
  87. /* The GFILE_FREELIST method SHOULD be called when you are done doing a multiselect
  88.  * a file/dir select using the tag GETFILE_DoMultiSelect and have processed the result.
  89.  * This method will free the list of struct Node structures.  If you do not free this
  90.  * list using this method, the list will not be freed until you dispose the class.
  91.  */
  92. OBJECT gfileFreelist
  93.   MethodID:ULONG,                /* GFILE_FREELIST */
  94.   gfile_Filelist:PTR TO List     /* The list of struct Node obtained using the GETFILE_Filelist tag in OM_GET.
  95.                     Can be NULL, in which case this method will do nothing. */
  96.  
  97. /* macros for calling the methods easily */
  98. #define gfRequestFile(obj, win )    DoMethod(obj, GFILE_REQUEST, win)
  99. #define gfRequestDir(obj, win )   DoMethod(obj, GFILE_REQUEST, win)
  100. #define gfFreeFilelist(obj, list )  DoMethod(obj, GFILE_FREELIST, list)
  101.